﻿using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;


namespace FixtureManageSystem.Models
{
    /// <summary>
    ///  用来搜索入库表的关键词
    /// </summary>
    public class WareHouseSearch                                                                                                                 : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        /// 条形码
        private string barCode = String.Empty;
        public string BarCode
        {
            get
            {
                return barCode;
            }
            set
            {
                if (value != this.barCode)
                {
                    barCode = value;
                    OnPropertyChanged();
                }
            }
        }

        /// <summary>
        /// 发货人名称
        /// </summary>

        private string _personName = String.Empty;
        public string PersonName
        {
            get
            {
                return _personName;
            }
            set
            {
                if (value != this._personName)
                {
                    _personName = value;
                    OnPropertyChanged();
                }
            }
        }

        /// <summary>
        /// 物品名称
        /// </summary>

        private string _name = String.Empty;
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                if (value != this._name)
                {
                    _name = value;
                    OnPropertyChanged();
                }
            }
        }

        // 起始日期
        private DateTime startTime;
        public DateTime StartTime
        {
            get { return startTime; }
            set { startTime = value; OnPropertyChanged(); }
        }

        /// <summary>
        /// 终止日期
        /// </summary>
        private DateTime endTime;
        public DateTime EndTime
        {
            get { return endTime; }
            set { endTime = value; OnPropertyChanged(); }
        }

        private void OnPropertyChanged([CallerMemberName] String propertyName = "")
        {
            PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
